import request from '@/utils/request'

// 创建erp生产入库
export function createErpProduceIn(data) {
  return request({
    url: '/wms/erp-produce-in/create',
    method: 'post',
    data: data
  })
}

// 撤销erp生产入库
export function cancelErpProduceIn(id) {
  return request({
    url: '/wms/erp-produce-in/cancel?id=' + id,
    method: 'delete'
  })
}

// 更新erp生产入库
export function updateErpProduceIn(data) {
  return request({
    url: '/wms/erp-produce-in/update',
    method: 'put',
    data: data
  })
}

// 删除erp生产入库
export function deleteErpProduceIn(id) {
  return request({
    url: '/wms/erp-produce-in/delete?id=' + id,
    method: 'delete'
  })
}

// 获得erp生产入库
export function getErpProduceIn(id) {
  return request({
    url: '/wms/erp-produce-in/get?id=' + id,
    method: 'get'
  })
}

// 获得erp生产入库分页
export function getErpProduceInPage(query) {
  return request({
    url: '/wms/erp-produce-in/page',
    method: 'get',
    params: query
  })
}

// 导出erp生产入库 Excel
export function exportErpProduceInExcel(query) {
  return request({
    url: '/wms/erp-produce-in/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
